package com.swa99ylum.pxp.a.a000;

import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.beanutils.BeanUtils;


public class Eoo {
	
	private List<?> ttt;


	public <T> Eoo(int start, int end, List<T> ttt, Class<T> clazz) throws InstantiationException, IllegalAccessException {
		super();
		
		
		for (int i = start; i < end+1; i++) {
			T ele = clazz.newInstance();
			ttt.add(ele);
		}
		this.ttt = ttt;
		
		for (Object t : this.ttt) {
			System.out.println(t);
		}
//		qwe = bbb;
//		
//		Object zxc = qwe.get(0);
//		System.out.println(zxc);
//		qwe.add(ele);
		
//		ccc.add(new Object());
//		System.out.println(qwe);
	}
	



	public void eoo() throws InstantiationException, IllegalAccessException, InvocationTargetException {
		List<?> sad = ttt;
		for (Object object : sad) {
			BeanUtils.setProperty(object, "name", "李四123");
			BeanUtils.setProperty(object, "id", "666");
		}
	}
	

	
	public static void main(String[] args) throws InstantiationException, IllegalAccessException, InvocationTargetException {
		
		List<Student> sss = new ArrayList<Student>();
		Eoo eoo = new Eoo(4, 9, sss, Student.class);
		
		eoo.eoo();
		
		for (Student t : sss) {
			System.out.println(t);
		}
		
		
	}

	
	
	
	
	
}
